Fibonacci def fibonacci(): """Infinite generator of Fibonacci numbers""" a, b = 0, 1 while True: yield a a, b = b, a + b Python Snippet Dec 10 2018